/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 combat_obstruction_finder.h

	$Header: /heroes4/combat_obstruction_finder.h $

	$NoKeywords: $

 ************************************************************************/

#if !defined( COMBAT_OBSTRUCTION_FINDER_H_INCLUDED )
#define COMBAT_OBSTRUCTION_FINDER_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "combat_path_finder_base.h"

// ---------------------------------------------------------------
// class to find paths for adventure map
// ---------------------------------------------------------------
class t_combat_obstruction_finder : public t_combat_path_finder_base
{
public:
	t_combat_obstruction_finder( t_battlefield& battlefield, bool has_castle );

	bool	find_obstruction( t_map_point_2d& result );
	void	get_path( t_map_point_2d const&	dest, t_combat_path& path );
	void	seed( t_map_point_2d const& point );
protected:
	t_map_point_2d	find_closest_point( t_map_point_2d const& start ) const;
	void			generate_paths();
	void			initialize();

	t_battlefield&	m_battlefield;
	bool			m_has_castle;
};


#endif // COMBAT_OBSTRUCTION_FINDER_H_INCLUDED